import i18n from '@src/locales';
import FormRelationSetting from './FormRelationSetting.vue'
import FormRelationPreview from './FormRelationPreview.vue'
import FormRelation from './FormRelation.vue'
import FormProductRalation from './FormProductRalation'
import FormServiceProviderRalation from './FormServiceProviderRalation'

const FormCustomerRelation = {
  formType: 'relationCustomer',
  name: i18n.t('common.form.type.relationCustomer'),
  component: {
    setting: FormRelationSetting,
    preview: FormRelationPreview,
    build: FormRelation
  }
}

const FormProductRelation = {
  formType: 'relationProduct',
  name: i18n.t('common.form.type.relationProduct'),
  component: {
    setting: FormRelationSetting,
    preview: FormRelationPreview,
    build: FormRelation
  }
}


const FormRelationReplacementPart = {
  formType: 'relationReplacementPart',
  name: i18n.t('common.form.type.relationReplacementPart'),
  previewIcon: 'icon-beijian1',
  component: {
    setting: FormRelationSetting,
    preview: FormRelationPreview,
    build: FormRelation
  }
}

const FormRelationReplacemen = {
  formType: 'relateProduct',
  name: i18n.t('common.form.type.relateProduct'),
  component: {
    build: FormProductRalation
  }
}

const FormRelateServiceProvider = {
  formType: 'relateServiceProvider',
  name: i18n.t('common.form.type.relateServiceProvider'),
  component: {
    build: FormServiceProviderRalation
  }
}
const FormRelationCustomTask = {
  formType: 'relationTask',
  name: i18n.t('common.form.type.relationTask'),
  component: {
    setting: FormRelationSetting,
    preview: FormRelationPreview,
    build: FormRelation
  }
}
export default [FormCustomerRelation, FormProductRelation, FormRelationReplacementPart, FormRelationReplacemen, FormRelateServiceProvider, FormRelationCustomTask]
